package com.example;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

@SpringBootApplication
public class DemoApplication extends WebMvcConfigurationSupport {

    public static void main(String[] args) throws Exception {

        ConfigurableApplicationContext context = SpringApplication.run(DemoApplication.class, args);

        //启动服务端
        WebSocketServer webSocketServer = context.getBean(WebSocketServer.class);
        webSocketServer.start();
    }
}